//===============================================================================
// Microsoft patterns & practices
// Web Client Software Factory
//-------------------------------------------------------------------------------
// Copyright (C) Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//-------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================
namespace WCSFContrib.PageFlow
{
	/// <summary>
	/// An object describing the results of a ProcessRequest() call on 
	/// <see cref="PageFlowHttpModule"/>.
	/// </summary>
	public class ProcessResult
	{
		private string _redirectUrl;
		private bool _shouldRedirect;

		/// <summary>
		/// Creates an instance of a ProcessResult.
		/// </summary>
		public ProcessResult()
		{
		}

		/// <summary>
		/// Creates an instance with the specified properties.
		/// </summary>
		/// <param name="shouldRedirect">Should the PageFlow engine redirect to another URL.</param>
		/// <param name="redirectUrl">The URL to redirect to.</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "1#")]
        public ProcessResult(bool shouldRedirect, string redirectUrl)
		{
			_shouldRedirect = shouldRedirect;
			_redirectUrl = redirectUrl;
		}

		/// <summary>
		/// Gets the URL to redirect to.
		/// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
		public string RedirectUrl
		{
            get { return _redirectUrl; }
		}

		/// <summary>
		/// Gets the determiniation if the request should be redirected to the RedirectUrl.
		/// </summary>
		public bool ShouldRedirect
		{
			get { return _shouldRedirect; }
		}
	}
}
